import callApi from '../utils/request';
import {
  API_STATION_LIST,
  API_PROVINCE_LIST,
  API_CITY_LIST,
  API_AREA_LIST,
  API_BRAND_LIST,
  API_DISTANCE_LIST,
  API_SEARCH_STATION,
  API_GEO,
  API_IN_STATION,
} from '../constants/api';

export function queryCurrentStation(params) {
  return callApi({
    api: API_IN_STATION,
    params,
  });
}

export function queryCityName(params) {
  return callApi({
    api: API_GEO,
    params,
  });
}

export function queryStationList(params) {
  return callApi({
    api: API_STATION_LIST,
    params,
  });
}

export function queryProvinceList(params) {
  return callApi({
    api: API_PROVINCE_LIST,
    params,
  });
}

export function queryCityList(params) {
  return callApi({
    api: API_CITY_LIST,
    params,
  });
}

export function queryAreaList(params) {
  return callApi({
    api: API_AREA_LIST,
    params,
  });
}

export function queryDistanceList(params) {
  return callApi({
    api: API_DISTANCE_LIST,
    params,
  });
}

export function queryBrandList(params) {
  return callApi({
    api: API_BRAND_LIST,
    params,
  });
}

export function searchStation(params) {
  return callApi({
    api: API_SEARCH_STATION,
    params,
  });
}
